Filename | (eval 1127)[/usr/lib/perl5/Template/Document.pm:78] |
Statements | Executed 8 statements in 11µs |
Eval Invoked At | /usr/lib/perl5/Template/Document.pm line 78 |
Sibling evals | 1, 2, 3, 4, 5, 6, 7, 8 |
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | sub { | ||||
2 | 2 | 2µs | my $context = shift || die "template sub called without context\n"; | ||
3 | 2 | 8µs | 2 | 8µs | my $stash = $context->stash; # spent 8µs making 2 calls to Template::Context::stash, avg 4µs/call |
4 | 2 | 1µs | my $output = ''; | ||
5 | 2 | 700ns | my $_tt_error; | ||
6 | |||||
7 | eval { BLOCK: { | ||||
8 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
9 | if (($stash->get('PAGE_NUMBERS'))) { | ||||
10 | $output .= "<div class=\"pages\">\n <!-- Row of numbers corresponding to search result pages -->\n "; | ||||
11 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
12 | if (($stash->get(['previous_page_offset', 0, 'defined', 0]))) { | ||||
13 | $output .= "<a class=\"nav\" href=\"/cgi-bin/koha/opac-search.pl?"; | ||||
14 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
15 | |||||
16 | # FILTER | ||||
17 | $output .= do { | ||||
18 | my $output = ''; | ||||
19 | my $_tt_filter = $context->filter('html') | ||||
20 | || $context->throw($context->error); | ||||
21 | |||||
22 | $output .= $stash->get('query_cgi'); | ||||
23 | |||||
24 | &$_tt_filter($output); | ||||
25 | }; | ||||
26 | |||||
27 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
28 | |||||
29 | # FILTER | ||||
30 | $output .= do { | ||||
31 | my $output = ''; | ||||
32 | my $_tt_filter = $context->filter('html') | ||||
33 | || $context->throw($context->error); | ||||
34 | |||||
35 | $output .= $stash->get('limit_cgi'); | ||||
36 | |||||
37 | &$_tt_filter($output); | ||||
38 | }; | ||||
39 | |||||
40 | $output .= "&offset="; | ||||
41 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
42 | $output .= $stash->get('previous_page_offset'); | ||||
43 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
44 | if (($stash->get('sort_by'))) { | ||||
45 | $output .= "&sort_by="; | ||||
46 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
47 | |||||
48 | # FILTER | ||||
49 | $output .= do { | ||||
50 | my $output = ''; | ||||
51 | my $_tt_filter = $context->filter('html') | ||||
52 | || $context->throw($context->error); | ||||
53 | |||||
54 | $output .= $stash->get('sort_by'); | ||||
55 | |||||
56 | &$_tt_filter($output); | ||||
57 | }; | ||||
58 | |||||
59 | } | ||||
60 | |||||
61 | $output .= "\"><< Previous</a>"; | ||||
62 | } | ||||
63 | |||||
64 | $output .= " "; | ||||
65 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
66 | |||||
67 | # FOREACH | ||||
68 | do { | ||||
69 | my ($_tt_value, $_tt_error, $_tt_oldloop); | ||||
70 | my $_tt_list = $stash->get('PAGE_NUMBERS'); | ||||
71 | |||||
72 | unless (UNIVERSAL::isa($_tt_list, 'Template::Iterator')) { | ||||
73 | $_tt_list = Template::Config->iterator($_tt_list) | ||||
74 | || die $Template::Config::ERROR, "\n"; | ||||
75 | } | ||||
76 | |||||
77 | ($_tt_value, $_tt_error) = $_tt_list->get_first(); | ||||
78 | eval { $_tt_oldloop = $stash->get('loop') }; | ||||
79 | $stash->set('loop', $_tt_list); | ||||
80 | eval { | ||||
81 | FOR1: while (! $_tt_error) { | ||||
82 | $stash->{'PAGE_NUMBER'} = $_tt_value; | ||||
83 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
84 | if (($stash->get(['PAGE_NUMBER', 0, 'highlight', 0]))) { | ||||
85 | $output .= "<span class=\"current\">"; | ||||
86 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
87 | $output .= $stash->get(['PAGE_NUMBER', 0, 'pg', 0]); | ||||
88 | $output .= "</span>"; | ||||
89 | } | ||||
90 | else { | ||||
91 | $output .= " <a class=\"nav\" href=\"/cgi-bin/koha/opac-search.pl?"; | ||||
92 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
93 | |||||
94 | # FILTER | ||||
95 | $output .= do { | ||||
96 | my $output = ''; | ||||
97 | my $_tt_filter = $context->filter('html') | ||||
98 | || $context->throw($context->error); | ||||
99 | |||||
100 | $output .= $stash->get('query_cgi'); | ||||
101 | |||||
102 | &$_tt_filter($output); | ||||
103 | }; | ||||
104 | |||||
105 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
106 | |||||
107 | # FILTER | ||||
108 | $output .= do { | ||||
109 | my $output = ''; | ||||
110 | my $_tt_filter = $context->filter('html') | ||||
111 | || $context->throw($context->error); | ||||
112 | |||||
113 | $output .= $stash->get('limit_cgi'); | ||||
114 | |||||
115 | &$_tt_filter($output); | ||||
116 | }; | ||||
117 | |||||
118 | $output .= "&offset="; | ||||
119 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
120 | $output .= $stash->get(['PAGE_NUMBER', 0, 'offset', 0]); | ||||
121 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
122 | if (($stash->get('sort_by'))) { | ||||
123 | $output .= "&sort_by="; | ||||
124 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
125 | |||||
126 | # FILTER | ||||
127 | $output .= do { | ||||
128 | my $output = ''; | ||||
129 | my $_tt_filter = $context->filter('html') | ||||
130 | || $context->throw($context->error); | ||||
131 | |||||
132 | $output .= $stash->get('sort_by'); | ||||
133 | |||||
134 | &$_tt_filter($output); | ||||
135 | }; | ||||
136 | |||||
137 | } | ||||
138 | |||||
139 | $output .= "\">"; | ||||
140 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
141 | $output .= $stash->get(['PAGE_NUMBER', 0, 'pg', 0]); | ||||
142 | $output .= "</a>"; | ||||
143 | } | ||||
144 | |||||
145 | $output .= " ";; | ||||
146 | ($_tt_value, $_tt_error) = $_tt_list->get_next(); | ||||
147 | } | ||||
148 | }; | ||||
149 | $stash->set('loop', $_tt_oldloop); | ||||
150 | die $@ if $@; | ||||
151 | $_tt_error = 0 if $_tt_error && $_tt_error eq Template::Constants::STATUS_DONE; | ||||
152 | die $_tt_error if $_tt_error; | ||||
153 | }; | ||||
154 | |||||
155 | $output .= " "; | ||||
156 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
157 | if (($stash->get('next_page_offset'))) { | ||||
158 | $output .= "<a class=\"nav\" href=\"/cgi-bin/koha/opac-search.pl?"; | ||||
159 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
160 | |||||
161 | # FILTER | ||||
162 | $output .= do { | ||||
163 | my $output = ''; | ||||
164 | my $_tt_filter = $context->filter('html') | ||||
165 | || $context->throw($context->error); | ||||
166 | |||||
167 | $output .= $stash->get('query_cgi'); | ||||
168 | |||||
169 | &$_tt_filter($output); | ||||
170 | }; | ||||
171 | |||||
172 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
173 | |||||
174 | # FILTER | ||||
175 | $output .= do { | ||||
176 | my $output = ''; | ||||
177 | my $_tt_filter = $context->filter('html') | ||||
178 | || $context->throw($context->error); | ||||
179 | |||||
180 | $output .= $stash->get('limit_cgi'); | ||||
181 | |||||
182 | &$_tt_filter($output); | ||||
183 | }; | ||||
184 | |||||
185 | $output .= "&offset="; | ||||
186 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
187 | $output .= $stash->get('next_page_offset'); | ||||
188 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
189 | if (($stash->get('sort_by'))) { | ||||
190 | $output .= "&sort_by="; | ||||
191 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc" | ||||
192 | |||||
193 | # FILTER | ||||
194 | $output .= do { | ||||
195 | my $output = ''; | ||||
196 | my $_tt_filter = $context->filter('html') | ||||
197 | || $context->throw($context->error); | ||||
198 | |||||
199 | $output .= $stash->get('sort_by'); | ||||
200 | |||||
201 | &$_tt_filter($output); | ||||
202 | }; | ||||
203 | |||||
204 | } | ||||
205 | |||||
206 | $output .= "\">Next >></a>"; | ||||
207 | } | ||||
208 | |||||
209 | $output .= " </div>"; | ||||
210 | } | ||||
211 | |||||
212 | $output .= " "; | ||||
213 | } }; | ||||
214 | if ($@) { | ||||
215 | $_tt_error = $context->catch($@, \$output); | ||||
216 | die $_tt_error unless $_tt_error->type eq 'return'; | ||||
217 | } | ||||
218 | |||||
219 | return $output; | ||||
220 | } | ||||
221 | |||||
222 | ; |